package com.ryskoo.catering.vendortemplaterel.domain;

import com.ryskoo.catering.vendortemplatereldetail.domain.VendorTemplateRelDetailPO;
import com.ryskoo.framework.core.bean.BasicPO;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

@Entity
@Table(name = "cater_vendor_template_rel")
public class VendorTemplateRelPO extends BasicPO {

    /** 商户uuid */
    @Column(name = "vendor_uuid",columnDefinition = "char",length = 32)
    private String vendorUuid;

    /** 属性模板uuid */
    @Column(name = "template_attr_uuid",columnDefinition = "char",length = 32)
    private String templateAttrUuid;

    /** 属性名称 */
    @Column(name = "attr_name",columnDefinition = "varchar",length = 20)
    private String attrName;

    /** 启用状态 1-启用；0-不启用 */
    @Column(name = "status")
    private boolean status;

    /** 是否是规格属性*/
    @Transient
    private boolean isSpec;

    /** 明细集合 */
    @Transient
    private List<VendorTemplateRelDetailPO> details;

    public String getVendorUuid() {
        return vendorUuid;
    }

    public void setVendorUuid(String vendorUuid) {
        this.vendorUuid = vendorUuid;
    }

    public String getTemplateAttrUuid() {
        return templateAttrUuid;
    }

    public void setTemplateAttrUuid(String templateAttrUuid) {
        this.templateAttrUuid = templateAttrUuid;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public List<VendorTemplateRelDetailPO> getDetails() {
        return details;
    }

    public void setDetails(List<VendorTemplateRelDetailPO> details) {
        this.details = details;
    }

    public String getAttrName() {
        return attrName;
    }

    public void setAttrName(String attrName) {
        this.attrName = attrName;
    }

    public boolean isSpec() {
        return isSpec;
    }

    public void setSpec(boolean spec) {
        isSpec = spec;
    }
}
